package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimePhysicalheadpicMapper;
import com.dime.physical.domain.DimePhysicalheadpic;
import com.dime.physical.service.IDimePhysicalheadpicService;

/**
 * 人员头像Service业务层处理
 * 
 * @author Tiny
 * @date 2023-09-20
 */
@Service
public class DimePhysicalheadpicServiceImpl implements IDimePhysicalheadpicService 
{
    @Autowired
    private DimePhysicalheadpicMapper dimePhysicalheadpicMapper;

    /**
     * 查询人员头像
     * 
     * @param id 人员头像主键
     * @return 人员头像
     */
    @Override
    public DimePhysicalheadpic selectDimePhysicalheadpicById(String id)
    {
        return dimePhysicalheadpicMapper.selectDimePhysicalheadpicById(id);
    }

    /**
     * 查询人员头像列表
     * 
     * @param dimePhysicalheadpic 人员头像
     * @return 人员头像
     */
    @Override
    public List<DimePhysicalheadpic> selectDimePhysicalheadpicList(DimePhysicalheadpic dimePhysicalheadpic)
    {
        return dimePhysicalheadpicMapper.selectDimePhysicalheadpicList(dimePhysicalheadpic);
    }

    /**
     * 新增人员头像
     * 
     * @param dimePhysicalheadpic 人员头像
     * @return 结果
     */
    @Override
    public int insertDimePhysicalheadpic(DimePhysicalheadpic dimePhysicalheadpic)
    {
        dimePhysicalheadpic.setCreateTime(DateUtils.getNowDate());
        return dimePhysicalheadpicMapper.insertDimePhysicalheadpic(dimePhysicalheadpic);
    }

    /**
     * 修改人员头像
     * 
     * @param dimePhysicalheadpic 人员头像
     * @return 结果
     */
    @Override
    public int updateDimePhysicalheadpic(DimePhysicalheadpic dimePhysicalheadpic)
    {
        dimePhysicalheadpic.setUpdateTime(DateUtils.getNowDate());
        return dimePhysicalheadpicMapper.updateDimePhysicalheadpic(dimePhysicalheadpic);
    }

    /**
     * 批量删除人员头像
     * 
     * @param ids 需要删除的人员头像主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalheadpicByIds(String[] ids)
    {
        return dimePhysicalheadpicMapper.deleteDimePhysicalheadpicByIds(ids);
    }

    /**
     * 删除人员头像信息
     * 
     * @param id 人员头像主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalheadpicById(String id)
    {
        return dimePhysicalheadpicMapper.deleteDimePhysicalheadpicById(id);
    }
}
